#include "Camera.h"
#include "Constants.h"
#include <SDL/SDL.h>

Camera::Camera()
{
	xPos = INIT_X_POS;
	yPos = INIT_Y_POS;
	zPos = INIT_Z_POS;
	pitch = INIT_PITCH;
	
}

Camera::~Camera()
{
}

void Camera::handleInput(bool keys[321], float timeD)
{
	if (keys[SDLK_w])
	{
		zPos += MOVE_SPEED * timeD;
	}
	if (keys[SDLK_s])
	{
		zPos -= MOVE_SPEED * timeD;
	}
	if(keys[SDLK_d])
	{
		xPos -= MOVE_SPEED * timeD;
	}
	if(keys[SDLK_a])
	{
		xPos += MOVE_SPEED * timeD;
	}
	if(keys[SDLK_c])
	{
		yPos += MOVE_SPEED * timeD;
	}
	if (keys[SDLK_e])
	{
		yPos -= MOVE_SPEED * timeD;
	}
	if (keys[SDLK_q])
	{
		pitch += ROTATE_SPEED * timeD;
	}
	if (keys[SDLK_z])
	{
		pitch -= ROTATE_SPEED * timeD;
	}
}
